using System;
using System.Collections.Generic;
using JetBrains.ReSharper.Daemon.CSharp.Stages;
using JetBrains.ReSharper.Daemon.Stages;
using JetBrains.ReSharper.Psi.Tree;
using Twins.Interface;

namespace Twins.Classes
{
    public class TwinsHighLighting : ITwinsHighLighting
    {
        public void UnderlineDuplication(IEnumerable<ILineCode> duplicationHashsLineCode,
                                         IHighlightingConsumer highlightingConsumer)
        {
            foreach (ILineCode lineCode in duplicationHashsLineCode)
            {
                highlightingConsumer.AddHighlighting(new ShowToolTipDuplicationCode(lineCode.Statement),
                                                     lineCode.Statement.GetDocumentRange());
            }
        }
    }
}